from django.db import models

# Create your models here.

class QuestionType(models.Model):

    question_type = models.CharField(max_length = 200)

    def __str__(self):
        return self.question_type

class Question(models.Model):
    question_type = models.ForeignKey(QuestionType,
                                     on_delete = models.CASCADE)
                                    #on_delete = models.SET_NULL
    question_text = models.CharField(max_length = 1000)
    pub_date = models.DateTimeField(auto_now_add = True)
    def __str__(self):
        return self.question_text
class Choice(models.Model):
    question = models.ForeignKey(Question,
                                 on_delete = models.CASCADE)
    choice_text = models.CharField(max_length = 100)

class Answer(models.Model):
    question = models.ForeignKey(Question,
                                 on_delete = models.CASCADE)
    answer_text = models.CharField(max_length = 1000)

class PaperKu(models.Model):

    paper_info = models.CharField(max_length = 1000)
    pub_date = models.DateTimeField(auto_now_add = True)
    















    
    
